package com.example.demo.controller;

import com.example.demo.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.demo.pojo.User;

import javax.annotation.Resource;

@RestController
public class UserController {

    @Resource
    private UserService userService;

    @RequestMapping("/hello")
    public User getUser(){
        User user=userService.getUser();
        System.out.println(user);

        return user;
    }
}
